<template>
	
	
 <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
	
	
	
	
</template>


<script setup>
import { ref, onMounted } from 'vue';
	
const statusBarHeight = ref(0);

onMounted(()=>{
	  // 获取系统信息
	  const systemInfo = uni.getSystemInfoSync();
	    // 获取状态栏高度（单位：px）
	  statusBarHeight.value = systemInfo.statusBarHeight;
	  
	  console.log("statusBarHeight:",statusBarHeight.value);
})




</script>